package com;

public class TestSequence {

	public static final String[] QC_DAY_FORMAT  = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" };
	
	public static void main(String[] args) {
		
		for(int i=100; i < 340; i++) {
			int curSeq = i;
			int leg = 2;
			String codeNo = createNo(curSeq, leg);
			System.out.println(codeNo + "   " + i);
		}
	}

	private static String createNo(int curSeq, int leg) {
		String no = String.valueOf(curSeq);
		if(no.length() - leg >= 2) {
			return "E R R O R";
		}
		if(no.length() > leg) {
			int codeIndex = Integer.parseInt(no.substring(0, 2));
			String first = QC_DAY_FORMAT[codeIndex];
			String end = no.substring(2);
			no =  first.concat(end);
		}
		return no;
	}

	private static String paddingLeft(String endNo, int leg) {
		if(endNo.length() < leg) {
			int cut = leg - endNo.length();
			for(int i=0;i<cut;i++) {
				endNo = "0"+endNo;
			}
		}
		return endNo;
	}
	
}
